public class Test {

    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.createTree();
        binaryTree.preOrder(root);
        System.out.println();
        System.out.println("===================");

        binaryTree.inOrder(root);
        System.out.println();
        System.out.println("===================");


        binaryTree.postOrder(root);
        System.out.println();
        System.out.println("===================");


        System.out.println("结点的个数: ");
        System.out.println(binaryTree.getNodeSize2(root));

        System.out.println("叶子的结点的个数: ");
        System.out.println(binaryTree.getLeafNodeCount2(root));

        System.out.println("第K层的结点个数: ");
        System.out.println(binaryTree.getKLevelNodeCount(root,1));

        System.out.println("树的高度: ");
        System.out.println(binaryTree.getHight(root));

        System.out.println("查找: ");
        BinaryTree.TreeNode ret = binaryTree.find(root,'A');
        System.out.println(ret.val);
    }
}
